package visitorMod;

import visitorMod.code.Analyzer;
import visitorMod.code.ClassExample;
import visitorMod.code.Code;

public class Client {
   public static void main(String[] args) {
        code code1 = new code();
        Code code = code1.new Code();
        ClassExample class1 = code1.new ClassExample("ExampleClass", 10);
        class1.addMethod("method1");
        class1.addMethod("method2");
        class1.addVar("var1");
        code.addClass(class1);

        ClassExample class2 = code1.new ClassExample("AnotherClass", 15);
        class2.addMethod("methodA");
        class2.addVar("varX");
        code.addClass(class2);

        Analyzer scaleAnalyzer = code1.new ScaleAnalyzer();
        Analyzer identifierAnalyzer = code1.new IdentifierAnalyzer();
        Analyzer lineCounterAnalyzer = code1.new LineCounterAnalyzer();

        System.out.println("Analyzing software scale:");
        code.accept(scaleAnalyzer);

        System.out.println("\nExtracting identifiers:");
        code.accept(identifierAnalyzer);

        System.out.println("\nCounting lines of code:");
        code.accept(lineCounterAnalyzer);
    }
}
